package ie.ucc.cs.anggaoproject.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.RichTextArea;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class editor implements EntryPoint {


/**
   * This is the entry point method.
   */
  public void onModuleLoad() {

    
    
    RichTextArea area = new RichTextArea();
    	area.ensureDebugId("cwRichText-area");
    	area.setSize("100%", "15em");

    RichTextToolbar toolbar = new RichTextToolbar(area);
    toolbar.ensureDebugId("cwRichText-toolbar");
    toolbar.setWidth("100%");


    Grid grid = new Grid(2, 1);
    grid.setStyleName("cw-RichText");
    grid.setWidget(0, 0, toolbar);
    grid.setWidget(1, 0, area);

    
    VerticalPanel vPanel = new VerticalPanel();
    vPanel.setWidth("100%");
    vPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
    vPanel.add(grid);


    // Add image and button to the RootPanel
    RootPanel.get().add(vPanel);


  }
}
